#ifndef __SEQUEUE_H
#define __SEQUEUE_H

typedef int data_t;

typedef struct 
{
    data_t * p_data;
    int maxlen;
    int front;          // 队头元素
    int rear;           // 队尾元素的下一位置
} sequeue;

sequeue * queue_create(int len);
int enqueue(sequeue * sq, data_t value);
data_t dequeue(sequeue * sq);
int queue_empty(sequeue * sq);
int queue_full(sequeue * sq);
int queue_clear(sequeue * sq);
sequeue * queue_free(sequeue * sq);


#endif // !__SEQUEUE_H